//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopSkuAttrs, MinishopSkuAttrsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopSkuAttrsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopSkuAttrsResponse>(`/uctoo/minishop_sku_attrs/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopSkuAttrs = async (id: string) => {
  return requestClient.get<MinishopSkuAttrs>(`/uctoo/minishop_sku_attrs/${id}`);
};

export const adductooMinishopSkuAttrs = async (data: Partial<MinishopSkuAttrs>) => {
  return requestClient.post<MinishopSkuAttrs>('/uctoo/minishop_sku_attrs/add', data);
};

export const edituctooMinishopSkuAttrs = async (data: Partial<MinishopSkuAttrs>) => {
  return requestClient.post<MinishopSkuAttrs>('/uctoo/minishop_sku_attrs/edit', data);
};

export const deleteuctooMinishopSkuAttrs = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_sku_attrs/del', { id });
};
